Skip to content

feat: Add a helm-lint job to the build workflow - #635

Open
lfrancke wants to merge 1 commit into
push-ssyrrqqpnvktfrom
push-xuvzqunkompn
Open

feat: Add a helm-lint job to the build workflow#635
lfrancke wants to merge 1 commit into
push-ssyrrqqpnvktfrom
push-xuvzqunkompn

Conversation

@lfrancke

@lfrancke lfrancke commented Aug 16, 2026

Copy link
Copy Markdown
Member

Ports the helm-lint job from stackabletech/hive-operator#743 into the template

helm lint validates the chart templates and, where a values.schema.json exists, the default values against it. The chart cannot render without a registry overlay, because image.repository is only set there, so both published registries are linted.

Stacked on #634, which ports stackabletech/hive-operator#742.
This is my first time trying the stacked PR feature...so...no idea how that works until I try.

See hive-operator#743 which already tested this for Hive.

helm lint validates the chart templates and, where a values.schema.json exists,
the default values against it.
@lfrancke
lfrancke marked this pull request as ready for review August 16, 2026 18:41
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Aug 16, 2026

@Techassi Techassi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in general, just one question.

CHART_DIRECTORY: deploy/helm/{[ operator.name }]
run: |
for registry in oci.stackable.tech quay.io; do
helm lint "$CHART_DIRECTORY" --values "$CHART_DIRECTORY/values/${registry}.yaml"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this shouldn't work or does helm pick up the values.yaml file automatically?

Because the overlay only contains a single field (image.reposiotry). Ideally they files should be merged first, or both the regular values.yaml file and the overlay should be provided via --values.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You give it the chart directory as the first parameter.

deploy/helm/hive-operator on  HEAD (8a9af6f) [?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2
❯ helm lint .
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 25: found character that cannot start any token

Error: 1 chart(s) linted, 1 chart(s) failed

deploy/helm/hive-operator on  HEAD (8a9af6f) [?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2

deploy/helm/hive-operator on  HEAD (8a9af6f) [?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2
❯ helm lint . --values values/oci.stackable.tech.yaml
==> Linting .
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed

deploy/helm/hive-operator on  HEAD (8a9af6f) [?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2
❯ echo "kaput!!(:#}/{}\}…[}" | save values.yaml --append

deploy/helm/hive-operator on  HEAD (8a9af6f) [!?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2

deploy/helm/hive-operator on  HEAD (8a9af6f) [!?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2 took 2s
❯ helm lint . --values values/oci.stackable.tech.yaml
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] values.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 77: could not find expected ':'
[ERROR] templates/: cannot load values.yaml: cannot unmarshal yaml document: error converting YAML to JSON: yaml: line 75: could not find expected ':'
[ERROR] : unable to load chart
        cannot load values.yaml: cannot unmarshal yaml document: error converting YAML to JSON: yaml: line 75: could not find expected ':'

Error: 1 chart(s) linted, 1 chart(s) failed

deploy/helm/hive-operator on  HEAD (8a9af6f) [!?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2

deploy/helm/hive-operator on  HEAD (8a9af6f) [!?] is 󰏗 v0.0.0-dev via ⎈ v4.2.2
❯ helm lint .
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] values.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 77: could not find expected ':'
[ERROR] templates/: cannot load values.yaml: cannot unmarshal yaml document: error converting YAML to JSON: yaml: line 75: could not find expected ':'
[ERROR] : unable to load chart
        cannot load values.yaml: cannot unmarshal yaml document: error converting YAML to JSON: yaml: line 75: could not find expected ':'

Error: 1 chart(s) linted, 1 chart(s) failed

So, it already works as you expect it to.
It merges during linting and it checks both overlays.

@Techassi

Copy link
Copy Markdown
Member

so...no idea how that works until I try.

Spoiler alert: It won't work :)

@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Aug 17, 2026
@lfrancke

Copy link
Copy Markdown
Member Author

so...no idea how that works until I try.

Spoiler alert: It won't work :)

It works differently than I expected. Let's see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

2 participants